<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <ui:composition template="/common/templates/common.xhtml">
            <ui:param name="titulo" value="Tarjeta de Crédito" />

            <ui:define name="body">
                <rich:panel>
                    <rich:messages passedLabel="Data is allowed to be stored." layout="list">
                        <f:facet name="header">
                            <h:outputText value="Entered Data Status:"></h:outputText>
                        </f:facet>
                        <f:facet name="infoMarker">
                            <h:graphicImage  value="/img/passed_.gif" />
                        </f:facet>
                        <f:facet name="errorMarker">
                            <h:graphicImage value="/img/error_.gif" />
                        </f:facet>
                    </rich:messages>
                </rich:panel>

                <a4j:form id="TarjetaCredito">

                    <h:panelGrid id="panelGridTarjeta" columns="1">
                        <rich:panel id="panelTarjeta">
                            <f:facet name="header">
                                <h:outputText id="labelTitulo" value="Tarjeta de Crédito"/>
                            </f:facet>

                            <h:panelGrid id="panelGridInput"  columns="3">
                                <h:outputLabel id="labelNumero" value="Número Tarjeta: "/>
                                <h:inputText id="numero" value="#{TarjetaCreditoBean.id}" disabled="#{TarjetaCreditoBean.editarTarjeta}"/>
                                <h:outputText id="spaceNoRequirednumero" value="" escape="false"/>

                                <h:outputLabel id="labelMonto" value="Valor Monto: "/>
                                <h:inputText id="monto" value="#{TarjetaCreditoBean.montoTarjeta}" />
                                <h:outputText id="spaceNoRequiredMonto" value="" escape="false"/>
                            </h:panelGrid>
                        </rich:panel>
                    </h:panelGrid>
                    <rich:spacer id="space1" width="5"></rich:spacer>
                    <h:panelGrid id="panelGridButton" columns="3">
                        <h:commandButton id="btnInsertar" value="#{Messages['common.insert']}" action="#{TarjetaCreditoBean.crearTarjetaCredito}"/>
                        <h:outputText id="space" value="" escape="false"/>
                        <h:commandButton id="btnCancelar" value="#{Messages['common.cancel']}" action="cancel"/>
                    </h:panelGrid>

                </a4j:form>
            </ui:define>
        </ui:composition>
    </body>
</html>